import * as THREE from 'three'
import {camera} from './camera';
import {renderer} from './renderer';

const OrbitControls = require('three-orbitcontrols')
// 控制器
export const controls = new OrbitControls(camera, renderer.domElement)
  // 使动画循环使用时阻尼或自转 意思是否有惯性
  controls.enableDamping = true;
  //动态阻尼系数 就是鼠标拖拽旋转灵敏度
  //controls.dampingFactor = 0.25;
  //是否可以缩放
  controls.enableZoom = true;
  //是否自动旋转
  controls.autoRotate = false;
  //设置相机距离原点的最远距离
  controls.minDistance = 15;
  //设置相机距离原点的最远距离
  controls.maxDistance = 120;
  //是否开启右键拖拽
  controls.enablePan = true;
